package com.only4play.practice.park.core.service.impl;

import com.only4play.codegen.support.model.JsonObject;
import com.only4play.practice.park.core.entity.PkParkingCar;
import com.only4play.practice.park.core.model.req.ConfirmExitParkReq;
import com.only4play.practice.park.core.model.req.RequestExitParkReq;
import com.only4play.practice.park.core.model.vo.PkParkingBillVo;
import com.only4play.practice.park.core.service.CarExitParkService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author mengdy
 */
@Slf4j
@Service
public class CarExitParkServiceImpl implements CarExitParkService {
    @Override
    public JsonObject<String> requestExitPark(RequestExitParkReq requestExitParkReq) {

        log.info("[requestExitPark]...车辆请求出场参数 = {}", requestExitParkReq);

        // 参数检查，判断是否符合出场条件 【黑名单或场内记录】

        PkParkingBillVo parkingBillVo = null;


        // 临停车的停车费用
        Long totalFeeAmount = 0L;

        // 利用责任链模式计算停车费用









        return JsonObject.success("success");


    }

    @Override
    public JsonObject<PkParkingCar> confirmExitPark(ConfirmExitParkReq confirmExitParkReq) {
        return null;
    }
}
